/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.evl.tecinfo.gui;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Tecinfo
 */
@Embeddable
public class RegistrohoraextraPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "MES")
    private int mes;
    @Basic(optional = false)
    @Column(name = "ANO")
    private int ano;
    @Basic(optional = false)
    @Column(name = "CodCPF")
    private String codCPF;

    public RegistrohoraextraPK() {
    }

    public RegistrohoraextraPK(int mes, int ano, String codCPF) {
        this.mes = mes;
        this.ano = ano;
        this.codCPF = codCPF;
    }

    public int getMes() {
        return mes;
    }

    public void setMes(int mes) {
        this.mes = mes;
    }

    public int getAno() {
        return ano;
    }

    public void setAno(int ano) {
        this.ano = ano;
    }

    public String getCodCPF() {
        return codCPF;
    }

    public void setCodCPF(String codCPF) {
        this.codCPF = codCPF;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) mes;
        hash += (int) ano;
        hash += (codCPF != null ? codCPF.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RegistrohoraextraPK)) {
            return false;
        }
        RegistrohoraextraPK other = (RegistrohoraextraPK) object;
        if (this.mes != other.mes) {
            return false;
        }
        if (this.ano != other.ano) {
            return false;
        }
        if ((this.codCPF == null && other.codCPF != null) || (this.codCPF != null && !this.codCPF.equals(other.codCPF))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.evl.tecinfo.gui.RegistrohoraextraPK[ mes=" + mes + ", ano=" + ano + ", codCPF=" + codCPF + " ]";
    }
    
}
